﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ClientDetail.aspx.cs" Inherits="famails.BackEnd.page.ClientDetail" MasterPageFile="~/BackEnd/template/BackEnd_NoneVMenu.Master" %>


<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">

    <script type="text/javascript">
        $(function () {
            $("#txtBirthday").jqxDateTimeInput({ width: '120px', height: '34px' });
            if ($('#ContentPlaceHolder1_txtBirthday_v').val() != undefined) {
                $('#txtBirthday').jqxDateTimeInput('val', $('#ContentPlaceHolder1_txtBirthday_v').val());
                $('#ContentPlaceHolder1_txtBirthday_v').val($("#txtBirthday").jqxDateTimeInput("getText"));
            }
            $('#txtBirthday').on('valuechanged', function (event) {
                $('#ContentPlaceHolder1_txtBirthday_v').val($("#txtBirthday").jqxDateTimeInput("getText"));
                //alert($('#ContentPlaceHolder1_txtBirthday_v').val());
            });
        });
    </script>
    <div style="width: 100%; padding: 10px;">
        <!--start content 01-->
        <div class="col-md-12 col-xs-12 col-sm-12 col-lg-12" style="padding: 0px; border: 1px solid #333;">
            <div class="col-md-12 col-xs-12 col-sm-12 col-lg-12" style="padding: 10px 20px; background: #000; color: #fff; font-size: 18px; font-weight: bold; position: relative;">
                Thông tin tài khoản -
                <asp:Label ID="lblEmail" runat="server" Text=""></asp:Label>
            </div>

            <div class="col-md-12 col-xs-12 col-sm-12 col-lg-12" style="padding: 0px;">
                <asp:Panel Visible="false" ID="pnError" runat="server">
                    <div class="error-box round" style="padding-top: 10px;">
                        <asp:Label ID="lblError" runat="server" Text=""></asp:Label>
                    </div>
                </asp:Panel>
                <asp:Panel Visible="false" ID="pnSuccess" runat="server">
                    <div class="confirmation-box round" style="padding-top: 10px;">
                        <asp:Label ID="lblSuccess" runat="server" Text=""></asp:Label>
                    </div>
                </asp:Panel>
            </div>
            <div class="col-md-12 col-xs-12 col-sm-12 col-lg-12" style="height: auto; padding: 10px;">
                <fieldset>
                    <div class="col-md-12 col-xs-12 col-sm-12 col-lg-12" style="height: auto; padding: 5px;">
                        <fieldset>
                            <div class="col-md-6 col-xs-12 col-sm-12 col-lg-6" style="height: auto; padding: 0px 10px;">
                                <h3><b>Tài khoản</b></h3>
                                <div class="col-md-12 col-xs-12 col-sm-12 col-lg-12" style="height: auto; padding: 10px 0px;">
                                    <fieldset>
                                        <div class="col-md-2 col-xs-12 col-sm-12 col-lg-2" style="margin-top: 7px; text-transform: none; padding: 0px;">
                                            Họ tên
                                        </div>
                                        <div class="col-md-10 col-xs-12 col-sm-12 col-lg-10" style="text-transform: none; padding: 0px;">
                                            <asp:TextBox ID="txtHoTen" runat="server" CssClass="form-control" Style="border: 1px solid #333; border-radius: 0px;"></asp:TextBox>
                                        </div>
                                    </fieldset>
                                </div>
                                <div class="col-md-12 col-xs-12 col-sm-12 col-lg-12" style="height: auto; padding: 10px 0px;">
                                    <fieldset>
                                        <div class="col-md-2 col-xs-12 col-sm-12 col-lg-2" style="margin-top: 7px; text-transform: none; padding: 0px;">
                                            Ngày sinh
                                        </div>
                                        <div class="col-md-4 col-xs-12 col-sm-12 col-lg-4" style="text-transform: none; padding: 0px;">
                                            <%--<asp:TextBox ID="txtDateofBirth" CssClass="form-control" style="border:1px solid #333;border-radius:0px;" runat="server"></asp:TextBox>--%>
                                            <div id="txtBirthday" style="border-radius: 0px; padding-left: 0px; border: 1px solid #333"></div>
                                            <asp:HiddenField runat="server" ID="txtBirthday_v"></asp:HiddenField>
                                        </div>
                                        <div class="col-md-2 col-xs-12 col-sm-12 col-lg-2" style="margin-top: 7px; text-transform: none; padding: 0px;">
                                            Số điện thoại
                                        </div>
                                        <div class="col-md-4 col-xs-12 col-sm-12 col-lg-4" style="text-transform: none; padding: 0px;">
                                            <asp:TextBox ID="txtSoDienThoai" runat="server" CssClass="form-control" Style="border: 1px solid #333; border-radius: 0px;"></asp:TextBox>
                                        </div>
                                    </fieldset>
                                </div>
                                <div class="col-md-12 col-xs-12 col-sm-12 col-lg-12" style="height: auto; padding: 10px 0px;">
                                    <fieldset>
                                        <div class="col-md-2 col-xs-12 col-sm-12 col-lg-2" style="margin-top: 7px; text-transform: none; padding: 0px;">
                                            Địa chỉ
                                        </div>
                                        <div class="col-md-10 col-xs-12 col-sm-12 col-lg-10" style="text-transform: none; padding: 0px;">
                                            <asp:TextBox ID="txtDiaChi" runat="server" CssClass="form-control" Style="border: 1px solid #333; border-radius: 0px;" TextMode="multiline" Rows="2"></asp:TextBox>
                                        </div>
                                    </fieldset>
                                </div>
                                <div class="col-md-12 col-xs-12 col-sm-12 col-lg-12" style="height: auto; padding: 0px;">
                                    <button id="Button2" runat="server" class="btn pull-right" style="background: #333; color: #fff; text-align: center; padding: 6px 15px; border-radius: 0px;" onserverclick="btnUpdate_Click">
                                        <i class="fa fa-upload" style="margin-right: 10px;"></i>Cập nhật
                                    </button>
                                </div>
                            </div>
                            <div class="col-md-6 col-xs-12 col-sm-12 col-lg-6" style="height: auto; padding: 0px 10px;">
                                <h3><b>Gói dịch vụ</b></h3>
                                <div class="col-md-12 col-xs-12 col-sm-12 col-lg-12" style="height: auto; padding: 10px 0px;">
                                    <fieldset>
                                        <div class="col-md-3 col-xs-6 col-sm-6 col-lg-3" style="text-transform: none; padding: 0px;">
                                            Gói sử dụng
                                        </div>
                                        <div class="col-md-3 col-xs-6 col-sm-6 col-lg-3" style="font-weight: bold; text-transform: none; color: #52964F; padding: 0px; text-align: left;">
                                            <asp:Label ID="lblTenGoi" runat="server" Text=""></asp:Label>
                                        </div>
                                        <div class="col-md-3 col-xs-6 col-sm-6 col-lg-3" style="text-transform: none; padding: 0px;">
                                            Ngày kích hoạt:
                                        </div>
                                        <div class="col-md-3 col-xs-6 col-sm-6 col-lg-3" style="font-weight: bold; text-transform: none; padding: 0px; text-align: left;">
                                            <asp:Label ID="lblNgayKichHoat" runat="server" Text=""></asp:Label>
                                        </div>
                                    </fieldset>
                                </div>
                                <div class="col-md-12 col-xs-12 col-sm-12 col-lg-12" style="height: auto; padding: 10px 0px;">
                                    <fieldset>
                                        <div class="col-md-3 col-xs-6 col-sm-6 col-lg-3" style="text-transform: none; padding: 0px;">
                                            Số tài khoản con
                                        </div>
                                        <div class="col-md-3 col-xs-6 col-sm-6 col-lg-3" style="font-weight: bold; text-transform: none; padding: 0px; text-align: left;">
                                            <asp:Label ID="lblSoTaiKhoanCon" runat="server" Text=""></asp:Label>
                                        </div>
                                        <div class="col-md-3 col-xs-6 col-sm-6 col-lg-3" style="text-transform: none; padding: 0px;">
                                            Ngày hết hạn:
                                        </div>
                                        <div class="col-md-3 col-xs-6 col-sm-6 col-lg-3" style="font-weight: bold; text-transform: none; padding: 0px; text-align: left;">
                                            <asp:Label ID="lblNgayDenHan" runat="server" Text=""></asp:Label>
                                        </div>
                                    </fieldset>
                                </div>
                                <div class="col-md-12 col-xs-12 col-sm-12 col-lg-12" style="height: auto; padding: 10px 0px;">
                                    <fieldset>
                                        <div class="col-md-3 col-xs-6 col-sm-6 col-lg-3" style="text-transform: none; padding: 0px;">
                                            Giới hạn email gửi
                                        </div>
                                        <div class="col-md-3 col-xs-6 col-sm-6 col-lg-3" style="font-weight: bold; text-transform: none; padding: 0px; text-align: left;">
                                            <asp:Label ID="lblSoLuongEmail" runat="server" Text=""></asp:Label>
                                        </div>
                                        <div class="col-md-3 col-xs-6 col-sm-6 col-lg-3" style="text-transform: none; padding: 0px;">
                                            Hạn nghạch gửi:
                                        </div>
                                        <div class="col-md-3 col-xs-6 col-sm-6 col-lg-3" style="font-weight: bold; text-transform: none; padding: 0px; text-align: left;">
                                            <asp:Label ID="lblGioiHanEmail" runat="server" Text=""></asp:Label>
                                        </div>
                                    </fieldset>
                                </div>

                                <div class="col-md-12 col-xs-12 col-sm-12 col-lg-12" style="height: auto; padding: 10px 10px; text-align: center;">
                                    <div class="col-md-3 col-xs-12 col-sm-12 col-lg-3" style="padding: 5px;">
                                        <button id="Button3" runat="server" class="btn" style="background: #333; border-radius: 0px; color: #fff; width: 100%;" onserverclick="btnGiahan_Click">
                                            <i class="fa fa-wrench" style="margin-right: 10px;"></i>Gia hạn
                                        </button>
                                    </div>
                                    <%--<div class="col-md-3 col-xs-12 col-sm-12 col-lg-3" style="padding:5px;">
                                        <button id="Button4" runat="server" class="btn" style="background: #333; border-radius: 0px; color: #fff;width:100%;" onserverclick="btnGiahan0_Click">
                                            <i class="fa fa-cog" style="margin-right:10px;"></i>Điều chỉnh
                                        </button>
                                     </div>--%>
                                    <div class="col-md-3 col-xs-12 col-sm-12 col-lg-3" style="padding: 5px;">
                                        <button id="Button1" runat="server" class="btn" style="background: #333; border-radius: 0px; color: #fff; width: 100%;" onserverclick="btnUpGradeServices_Click">
                                            <i class="fa fa-upload" style="margin-right: 10px;"></i>Nâng cấp
                                        </button>
                                    </div>
                                </div>

                            </div>
                        </fieldset>
                    </div>
                </fieldset>
            </div>
            <div class="col-md-12 col-xs-12 col-sm-12 col-lg-12" style="height: 2px; background: #333;">
                <fieldset>
                </fieldset>
            </div>

            <div class="col-md-12 col-xs-12 col-sm-12 col-lg-12" style="height: auto; padding: 10px;">
                <fieldset>
                    <div class="col-md-12" style="padding: 0px;">
                        <div class="col-md-12">
                            <span style="padding: 10px; margin: 0px; font-size: 24px"><b>Thông tin công ty</b></span>
                        </div>
                    </div>
                    <div class="col-md-3 col-xs-12 col-sm-12 col-lg-3" style="height: auto; padding: 10px; padding-top: 10px;">
                        <asp:Image runat="server" class="img" id="imgLogo"  style="width: 100%;" />
                        <asp:FileUpload runat="server" type="file" id="file_company" class="form-control" onchange="readURL(this);" style="display: block; border: 1px solid #333; border-radius: 0px;" accept="image/x-png, image/gif, image/jpeg" />
                        <asp:HiddenField runat="server" ID="hdfImage" />
                        <asp:Button runat="server" ID="deletefile" OnClick="deletefile_Click" />
                    </div>
                    <div class="col-md-9 col-xs-12 col-sm-12 col-lg-9" style="height: auto; padding: 0px;">

                        <div class="col-md-12 col-xs-12 col-sm-12 col-lg-12" style="height: auto; padding: 10px 0px;">
                            <div class="col-md-7 col-xs-12 col-sm-12 col-lg-7" style="height: auto; padding: 10px">
                                <fieldset>
                                    <div class="col-md-12" style="padding: 5px 0px;">

                                        <div class="col-md-12 col-xs-12 col-sm-12 col-lg-12" style="text-transform: none; padding: 0px;">
                                            <asp:TextBox runat="server" type="text" ID="txtCompany" class="form-control" placeholder="Tên công ty .." Style="border: 1px solid #333; border-radius: 0px;"></asp:TextBox>
                                        </div>
                                    </div>
                                    <div class="col-md-4" style="padding: 10px 0px;">

                                        <div class="col-md-12 col-xs-6 col-sm-6 col-lg-12" style="text-transform: none; padding: 0px; padding-right: 5px;">
                                            <asp:TextBox runat="server" type="text" ID="txtphone_company" placeholder="Điện thoại .." class="form-control" Style="border: 1px solid #333; border-radius: 0px;"></asp:TextBox>
                                        </div>
                                    </div>
                                    <div class="col-md-4" style="padding: 10px 0px;">

                                        <div class="col-md-12 col-xs-6 col-sm-6 col-lg-12" style="text-transform: none; padding: 0px 5px;">
                                            <asp:TextBox runat="server" type="text" ID="txtemail_company" placeholder="Email .." class="form-control" Style="border: 1px solid #333; border-radius: 0px;"></asp:TextBox>
                                        </div>
                                    </div>
                                    <div class="col-md-4" style="padding: 10px 0px;">

                                        <div class="col-md-12 col-xs-6 col-sm-6 col-lg-12" style="text-transform: none; padding: 0px; padding-left: 5px;">
                                            <asp:TextBox runat="server" type="text" ID="txtfax_company" placeholder="Fax .." class="form-control" Style="border: 1px solid #333; border-radius: 0px;"></asp:TextBox>
                                        </div>
                                    </div>
                                </fieldset>
                            </div>
                            <div class="col-md-5 col-xs-12 col-sm-12 col-lg-5" style="height: auto; padding: 10px">
                                <fieldset>
                                    <div class="col-md-12 col-xs-12 col-sm-12 col-lg-10" style="text-transform: none; padding: 5px;">
                                        <asp:TextBox runat="server" TextMode="MultiLine" ID="txtaddress_company" class="form-control" Style="border: 1px solid #333; resize: none; border-radius: 0px; height: 83px;" placeholder="Địa chỉ .."></asp:TextBox>
                                    </div>
                                </fieldset>
                            </div>
                        </div>

                    </div>
                </fieldset>
            </div>
            <div class="col-md-12 col-xs-12 col-sm-12 col-lg-12" style="height: 2px; background: #333;">
                <fieldset>
                </fieldset>
            </div>
            <div class="col-md-12 col-xs-12 col-sm-12 col-lg-12" style="height: auto; padding: 10px;">
                <fieldset>
                    <h3><b>Các tính năng</b></h3>
                    <asp:Repeater ID="rptFunction" runat="server">
                        <ItemTemplate>
                            <div class="col-md-3 col-lg-3 col-sm-6 col-xs-12" style="padding: 5px;">
                                <div style="border: 1px solid #333; color: #333; font-weight: bold; padding: 10px; text-align: center;">
                                    <%#Eval("functionName") %>
                                </div>
                            </div>
                        </ItemTemplate>
                    </asp:Repeater>
                </fieldset>
            </div>
            <asp:Button ID="btnGiahan" runat="server" CssClass="btn" Style="background: #333; color: #fff; border-radius: 0px; padding: 10px 14px;" OnClick="btnGiahan_Click" />
        </div>
    </div>

    <script type="text/javascript">
        $(function () {
            $('#ctl00_ctl00_ContentPlaceHolder1_txtDateofBirth').datetimepicker({
                changeMonth: true, changeYear: true, timeFormat: "", dateFormat: "dd/mm/yy"
            });
        });
    </script>
    <script>

        $(document).ready(function () {
            $('.img').click(function () {
                $('#file_company').click();
            });
        })

    </script>
    <script>
        function readURL(input) {
            if (input.files && input.files[0]) {
                var reader = new FileReader();
                reader.onload = function (e) {
                    $('.img')
                    .attr('src', e.target.result).width(250)
                .height(80);
                };
                reader.readAsDataURL(input.files[0]);
            }
        }
    </script>
</asp:Content>

